Skip to content

fix(tls): make Socket.IO transport optional - #13

Merged
senamakel merged 1 commit into
tinyhumansai:mainfrom
senamakel:vendor-main-full-ci
Aug 16, 2026
Merged

senamakel merged 1 commit into
tinyhumansai:mainfrom
senamakel:vendor-main-full-ci

Conversation

@senamakel

@senamakel senamakel commented Aug 16, 2026 •

Copy link
Copy Markdown
Member

Summary

  • preserve the Socket.IO API as a default-on socket feature
  • allow HTTP-only SDK consumers to disable the transport and its native-TLS/OpenSSL graph
  • gate Socket.IO integration tests with the same feature

Validation

  • cargo fmt --all -- --check
  • cargo check --all-targets
  • cargo check --all-targets --no-default-features
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo clippy --all-targets --no-default-features -- -D warnings
  • OpenHuman root and Tauri all-feature checks
  • OpenHuman Linux TLS dependency policy for both Cargo worlds

Summary by CodeRabbit

  • New Features
    • Socket functionality is now enabled by default while remaining optional.
    • Applications can disable Socket.IO support when it is not needed.
  • Bug Fixes
    • Core client functionality remains available without Socket.IO dependencies.
    • Socket-related APIs and error handling are only exposed when socket support is enabled.

Co-authored-by: Medulla <medulla@tinyhumans.ai>
@coderabbitai

coderabbitai Bot commented Aug 16, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f81dc958-8a2c-41d4-98c7-5d7069c57428

📥 Commits

Reviewing files that changed from the base of the PR and between 3b53d64 and 1cd5dee.

📒 Files selected for processing (3)
  • Cargo.toml
  • src/lib.rs
  • tests/socket.rs

Included review availability: Your plan includes up to 1 review per rolling hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The crate now makes Socket.IO support optional through a default-enabled Cargo feature. Socket-related modules, errors, connection APIs, and tests compile only when the socket feature is enabled.

Changes

Socket feature gating

Layer / File(s) Summary
Socket feature configuration
Cargo.toml
The socket feature enables the optional rust_socketio dependency by default.
Conditional Socket.IO API
src/lib.rs, tests/socket.rs
Socket-related modules, errors, conversion logic, connection APIs, and tests use the socket feature gate.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 1cd5d

Socket.IO remains enabled by default, while HTTP-only consumers can opt out of its APIs and native-TLS dependency chain; no actionable merge-blocking risk remains after normal checks and review.

Poem

A rabbit hops through feature gates,
While sockets wait at optional gates.
The default path still keeps them near,
Non-socket builds now run clear.
Tests curl their ears when sockets appear.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: making the Socket.IO transport optional.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@tinysweeper

tinysweeper Bot commented Aug 16, 2026

Copy link
Copy Markdown

How this change flows

2 changed behaviours across 9 relationships. 6 surrounding behaviours are shown (60 graph nodes walked). 32 further behaviours left out to keep the diagram readable.

flowchart LR
  n0["Error<br/>changed"]:::changed
  n1["TinyHumansClient<br/>changed"]:::changed
  n2["send_typed"]:::impacted
  n3["decode_medulla"]:::impacted
  n4["...ream_url_carries_the_encoded_token_and_id"]:::impacted
  n5["send"]:::impacted
  n6["with_token"]:::impacted
  n7["decode"]:::impacted
  n2 -->|uses| n0
  n2 -->|calls| n5
  n3 -->|uses| n0
  n3 -->|calls| n7
  n4 -->|uses| n1
  n4 -->|calls| n6
  n4 -->|tests| n6
  n5 -->|uses| n0
  n7 -->|uses| n0
  classDef changed fill:#0d4429,stroke:#238636,color:#e6edf3
  classDef impacted fill:#161b22,stroke:#6e7681,color:#c9d1d9
  classDef flagged fill:#5a1e02,stroke:#d93f0b,color:#ffffff
  classDef blocking fill:#67060c,stroke:#f85149,color:#ffffff
Loading

Green: changed behaviour. Grey: surrounding behaviour. Arrows name the call, use, implementation, or test relationship. Orange: has findings. Red: has a finding that blocks the merge.

tinysweeper 0.1.0

@tinysweeper tinysweeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tinysweeper found nothing blocking. Approving.

             $0.0306 · 68,310 in / 10,510 out · 13,696 cached (20%) · deepseek/deepseek-v4-pro-0813, openrouter/openai/text-embedding-3-small · 63 embedded
critique:    $0.0140 · 26,677 in / 4,901 out  · 4,352 cached (16%)  · deepseek/deepseek-v4-pro-0813
security:    $0.0105 · 25,502 in / 1,110 out  · 3,584 cached (14%)  · deepseek/deepseek-v4-pro-0813
tests:       $0.0035 · 8,995 in  / 316 out    · 1,664 cached (18%)  · deepseek/deepseek-v4-pro-0813
description: $0.0014 · 3,212 in  / 851 out    · 1,664 cached (52%)  · deepseek/deepseek-v4-pro-0813

Comment thread Cargo.toml
@tinysweeper tinysweeper Bot added the priority: p2 Soon. Real but survivable — a rough edge, a gap, a thing that will bite later. label Aug 16, 2026
@senamakel
senamakel merged commit 9f3a568 into tinyhumansai:main Aug 16, 2026
8 checks passed
senamakel added a commit to tinyhumansai/openhuman that referenced this pull request Aug 21, 2026
`vendor/tinyhumans-sdk` sat at 1cd5dee (the optional Socket.IO transport,
tinyhumansai/sdk#13). Move it to 83ab7b1, picking up:

- tinyhumansai/sdk#14, #15 — the spend-cap routes and their spec sync
- tinyhumansai/sdk#16 — `/agent-integrations/*` split one module per
  provider, a verified pure move with `api::agent_integration_types` kept
  as a re-export shim

This crate imports `tinyhumans_sdk::api::types` and `tinyhumans_sdk::jwt`
only, neither of which the split touches, and the SDK is taken with
`default-features = false`, so the socket feature stays off.

Gitlink only — Cargo.lock is unchanged, since the crate version and its
dependency set did not move.

Co-authored-by: Medulla <medulla@tinyhumans.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: p2 Soon. Real but survivable — a rough edge, a gap, a thing that will bite later.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant